﻿define(["service/service", "service/httpService"], function (service) {
    service.factory("advertisementService", function (httpService) {
        var methods = {
            gets: function (params) {
                return httpService.get("/admin/advertisement/gets", params);
            },
            get: function (params) {
                return httpService.get("/admin/advertisement/get", params);
            },
            "update": function (params) {
                return httpService.upload("/admin/advertisement/update", params);
            },
            "add": function (params) {
                return httpService.upload("/admin/advertisement/add", params);
            },
            "delete": function (id) {
                return httpService.delete("/admin/advertisement/delete/" + id);
            },
            "updateStatus": function (id, status) {
                return httpService.post("/admin/advertisement/updateStatus", { id: id, status: status });
            }
        }
        return methods;
    });
});